'''
Created on 2013. 5. 15.

@author: Alghost
'''
from google.appengine.ext import ndb

class Users(ndb.Model):
    '''
        Default users
    '''

    user_nickname = ndb.StringProperty()
    user_email = ndb.StringProperty()
    user_passwd = ndb.StringProperty()
    user_auth = ndb.IntegerProperty()
    
class UserConfirm(ndb.Model):
    user_email = ndb.StringProperty()
    hash_key = ndb.StringProperty()
    
class ChannelSession(ndb.Model):
    user_nickname = ndb.StringProperty()
    session_id = ndb.StringProperty()
    
class ChatList(ndb.Model):
    user_nickname = ndb.StringProperty()
    msg = ndb.StringProperty()
    timestamp = ndb.DateTimeProperty(auto_now_add=True)
    
class Notice(ndb.Model):
    subject = ndb.StringProperty()
    content = ndb.TextProperty()
    timestamp = ndb.DateTimeProperty(auto_now_add=True)

class Image(ndb.Model):
    uploader = ndb.StringProperty()
    image_key = ndb.StringProperty()
    content = ndb.TextProperty()
    timestamp = ndb.DateTimeProperty(auto_now_add=True)